Bool is a boolean XPath type Bool satisfies the HasBool interface for Bool's Num satisfies the HasNum interface for Bool's ResValue satisfies the Res interface for Bool
Bool : IsBool
Bool : IsNum
Bool : Result
Bool : fmt.Stringer
func Bool.Bool() Bool
func IsBool.Bool() Bool
func NodeSet.Bool() Bool
func Num.Bool() Bool
func String.Bool() Bool
Ctx represents the current context position, size, node, and the current filtered resultNodeSetNodeSetPosintSizeint Bool satisfies the HasBool interface for node-set's Num satisfies the HasNum interface for NodeSet's String satisfies the Res interface for NodeSet
Ctx : IsBool
Ctx : IsNum
Ctx : Result
Ctx : fmt.Stringer
func Wrap.Call(c Ctx, args ...Result) (Result, error)
Elem is a XPath result that is an element node GetAttrs returns the attributes of the element GetChildren returns the elements children. GetNodeType returns the node's type GetParent returns the parent node, which will always be an XML element GetToken returns the xml.Token representation of the node Pos returns the node's position in the document order ResValue prints the node's string valueNSElem(interface)
*github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele.XMLEle
Elem : Node
func Elem.GetParent() Elem
func Node.GetParent() Elem
func NS.GetParent() Elem
func NSElem.GetParent() Elem
func github.com/ChrisTrenkamp/goxpath/tree/xmltree.DirectiveParser.GetParent() Elem
func github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlbuilder.XMLBuilder.GetParent() Elem
func github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele.(*XMLEle).GetParent() Elem
func github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlnode.XMLNode.GetParent() Elem
func BuildNS(t Elem) (ret []NS)
func GetAttribute(n Elem, local, space string) (xml.Attr, bool)
func GetAttributeVal(n Elem, local, space string) (string, bool)
func GetAttrValOrEmpty(n Elem, local, space string) string
Fn is a XPath function, written in Go
IsBool is used for the XPath boolean function. It turns the data type to a bool.( IsBool) Bool() BoolBoolCtxNodeSetNumString
IsNum is used for the XPath number function. It turns the data type to a number.( IsNum) Num() NumBoolCtxNodeSetNumString
LastArgOpt sets whether the last argument in a function is optional, variadic, or neither
const None
const Optional
const Variadic
NodePos is a helper for representing the node's document order Pos returns the node's document order position
NodeSet is a node-set XPath type Bool satisfies the HasBool interface for node-set's Num satisfies the HasNum interface for NodeSet's String satisfies the Res interface for NodeSet
NodeSet : IsBool
NodeSet : IsNum
NodeSet : Result
NodeSet : fmt.Stringer
func github.com/ChrisTrenkamp/goxpath.XPathExec.ExecNode(t Node, opts ...goxpath.FuncOpts) (NodeSet, error)
NS is a namespace node.Attrxml.AttrAttr.Namexml.NameAttr.ValuestringNodePosNodePosNodeTypeNodeTypeParentElem GetNodeType returns the node's type. GetParent returns the parent node of the namespace. GetToken returns the xml.Token representation of the namespace. Pos returns the node's document order position ResValue returns the string value of the namespace
NS : Node
func BuildNS(t Elem) (ret []NS)
NSBuilder is a helper-struct for satisfying the NSElem interfaceNSmap[xml.Name]string GetNS returns the namespaces found on the current element. It should not be
confused with BuildNS, which actually resolves the namespace nodes.
NSElem is a node that keeps track of namespaces. GetAttrs returns the attributes of the element GetChildren returns the elements children.( NSElem) GetNS() map[xml.Name]string GetNodeType returns the node's type GetParent returns the parent node, which will always be an XML element GetToken returns the xml.Token representation of the node Pos returns the node's position in the document order ResValue prints the node's string value
*github.com/ChrisTrenkamp/goxpath/tree/xmltree/xmlele.XMLEle
NSElem : Elem
NSElem : Node
Num is a number XPath type Bool satisfies the HasBool interface for Num's Num satisfies the HasNum interface for Num's ResValue satisfies the Res interface for Num
Num : IsBool
Num : IsNum
Num : Result
Num : fmt.Stringer
func GetNodeNum(n Node) Num
func Bool.Num() Num
func IsNum.Num() Num
func NodeSet.Num() Num
func Num.Num() Num
func String.Num() Num
String is string XPath type Bool satisfies the HasBool interface for String's Num satisfies the HasNum interface for String's ResValue satisfies the Res interface for String
String : IsBool
String : IsNum
String : Result
String : fmt.Stringer
Wrap interfaces XPath function calls with GoFnFnLastArgOptLastArgOpt NArgs represents the number of arguments to the XPath function. -1 represents a single optional argument Call checks the arguments and calls Fn if they are valid
func github.com/ChrisTrenkamp/goxpath/internal/execxp.Exec(n *parser.Node, t Node, ns map[string]string, fns map[xml.Name]Wrap, v map[string]Result) (Result, error)
Package-Level Functions (total 6)
BuildNS resolves all the namespace nodes of the element and returns them
FindNodeByPos finds a node from the given position. Returns nil if the node
is not found.
GetAttribute is a convenience function for getting the specified attribute from an element.
false is returned if the attribute is not found.
GetAttributeVal is like GetAttribute, except it returns the attribute's value.
GetAttrValOrEmpty is like GetAttributeVal, except it returns an empty string if
the attribute is not found instead of false.
GetNodeNum converts the node to a string-value and to a number
Package-Level Constants (total 13)
Boolean strings
LastArgOpt options
These are all the possible node types
These are all the possible node types
These are all the possible node types
These are all the possible node types
These are all the possible node types
These are all the possible node types
These are all the possible node types
LastArgOpt options
Boolean strings
LastArgOpt options
XMLSpace is the W3C XML namespace
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.